import requests

from api.depart_api import DepartApi
from common.token_util import TokenUtil

class IdUtil:
    @classmethod
    def get_departId(cls, get_token=TokenUtil.get_token()):
        token= get_token
        body = {"name": "测试091", "code": "1234"}
        resp = DepartApi.add_depart_api(token,body)
        return resp.json().get("data").get("id")

# if __name__ == '__main__':
#     print(IdUtil.get_departId())